package com.dat255.internalstorage;

import java.util.ArrayList;

import com.dat255.tentatime.Exam;



/**
 * This interface includes the essential methods to manage exam objects on
 * the internal storage
 * 
 * @author Joseph Hejderup
 * @version 1
 */
public interface IStorage {
	
	/**
	 * This method will retrieve the exam with a given courseid
	 * @param index of the exam object 
	 * @return the exam object of the specified position
	 */
	Exam getExam(String courseid);
	/**
	 * Returns a list containing all the currently stored exams
	 * @return
	 */
	ArrayList<Exam> allExams();
	/**
	 * This method will store the specified exam object 
	 * @param The specified exam object to be stored
	 * @return True if successful
	 */
	boolean addExam(Exam exam);
	/**
	 * This method will store several exams in the system
	 * @param List of the exams objects to be stored
	 * @return True if all exams was added successfully, false if one of exams failed to be stored
	 */
	//boolean addExam(List<Exam> exams);
	/**
	 * Removes the exam object with the specific courseid
	 * @param the specified position of the exam object
	 * @return
	 */
	boolean removeExam(String courseid);
	/**
	 * Removes the specified exam object from the system
	 * @param the exam object to be removed
	 * @return True if successful
	 */
	boolean removeExam(Exam exam);
	/**
	 * Replaces the exam object with a new exam object, the exam is found with use of courseid
	 * @param The changed exam object
	 * @param courseid of the exam object 
	 * @return True if the change was successful
	 */
	boolean changeExam(Exam exam, String courseid);
	/**
	 * Check whether the system stores any exams
	 * @return True if there are no exams stored
	 */
	boolean isEmpty();
	/**
	 * Returns true if the exam object exist in the system
	 * @param  the exam object whose presence in the system is to be tested.
	 * @return True if the exam exist in the system, false otherwise
	 */
	boolean containsExam(Exam exam);
	/**
	 * this method will delete the entire database
	 * @return
	 */
	boolean removeAllExams();
	

	
	
	
	
	
	
	
	

}
